﻿/**********************************天使物流*******************************************
* 功能描述:基本信息-油费
* 作者:李周蓬
* 时间:
* 
**********************************天使物流*******************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TianShiProject.Models.BaseInfo.OilCosts;
using TianShiProject.Models.Common;
using Volo.Abp.Application.Services;

namespace TianShiProject.BaseInfo.OilCosts
{
    public class OilCostService : ApplicationService
    {
        private readonly IOilCostRepository _oilCostRepository ;
        public OilCostService(IOilCostRepository oilCostRepository)
        {
            _oilCostRepository = oilCostRepository;
        }
        /// <summary>
        /// 显示油费管理
        /// </summary>
        /// <param name="cardname"></param>
        /// <param name="name"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public async Task<PageResponse<OilCostDto>> GetShowOilCost(string cardname, string name, int pageindex = 1, int pagesize = 3)
        {
            return await _oilCostRepository.GetShowOilCost(cardname, name, pageindex, pagesize);
        }
        /// <summary>
        /// 删除油费管理
        /// </summary>
        /// <returns></returns>
        public async Task<int> DeleteDelOilCost(int id)
        {
            return await _oilCostRepository.DeleteDelOilCost(id);
        }
        /// <summary>
        /// 批量删除油费管理
        /// </summary>
        /// <returns></returns>
        public async Task<int> DeleteDelsOilCost(string ids)
        {
            return await _oilCostRepository.DeleteDelsOilCost(ids);
        }
        /// <summary>
        /// 编辑修改
        /// </summary>
        /// <param name="OilCostDto"></param>
        /// <returns></returns>
        public async Task<int> PutUpdateOilCost(OilCostDto oilCostDto)
        {
            return await _oilCostRepository.PutUpdateOilCost(oilCostDto);
        }
        /// <summary>
        /// 添加油费管理
        /// </summary>
        /// <param name="OilCostDto"></param>
        /// <returns></returns>
        public async Task<int> PostAddOilCost(OilCostDto oilCostDto)
        {
            return await _oilCostRepository.PostAddOilCost(oilCostDto);
        }
        /// <summary>
        /// 绑定
        /// </summary>
        /// <returns></returns>
        public async Task<PageResponse<DictionaryDto>> GetBind()
        {
            return await _oilCostRepository.GetBind();
        }
    }
}
